<?php 
	$calendarLanguageTMP = explode('_',Yii::app()->getLanguage());
	$calendarLanguage = $calendarLanguageTMP[0] . '-' . strtoupper($calendarLanguageTMP[1]);
	
	if($calendarLanguageTMP[0] == 'en')
	{
		$calendarLanguage = 'en-GB';
	}
	
	if($calendarLanguageTMP[0] == 'es')
	{
		$calendarLanguage = 'es';
	}
?>
<div class="form grid_9">

<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
)); ?>

	

	<div class="row grid_4">
		<?php echo $form->label($model,'persona_nombres'); ?>
		<?php echo $form->textField($model,'persona_nombres',array('maxlength'=>50)); ?>
	</div>

	<div class="row grid_5">
		<?php echo $form->label($model,'persona_apellido'); ?>
		<?php echo $form->textField($model,'persona_apellido',array('maxlength'=>50)); ?>
	</div>
	
	<div class="row grid_3">
		<?php echo $form->label($model,'persona_tipodocumento_id'); ?>
		<?php echo $form->textField($model,'persona_tipodocumento_id',array('maxlength'=>20)); ?>
	</div>

	<div class="row grid_4">
		<?php echo $form->label($model,'persona_fechanacimiento'); ?>
		<?php 
			$this->widget('zii.widgets.jui.CJuiDatePicker',
					array(
							'model'=>$model,
							'attribute'=>'persona_fechanacimiento',
							
							'language' => $calendarLanguage,
							'options' => array(
												'dateFormat'=>Yii::app()->locale->getDateFormat('calendar_short_format'),
												'changeMonth' => 'true',
												'changeYear' => 'true',
												'constrainInput' => 'false',
												'duration'=>'fast',
												'showAnim' =>'slide',
												'yearRange' => '1900:' . date('Y'),
							),
							'htmlOptions'=>array(
												/*'style'=>'height:30px;
															background:#ffbf00;
															color:#00a;	
															font-weight:bold;
															font-size:0.9em;
															border: 1px solid #A80;
															padding-left: 4px;'
												*/
							)
						)
		);
		?>
	</div>

	<div class="row grid_2">
		<?php echo $form->label($model,'persona_sexo_id'); ?>
		<?php echo $form->dropDownList(
                                                        $model,
                                                        'persona_sexo_id',
                                                        CHtml::listData(
                                                                        Sexo::model()->findAll(),
                                                                        'sexo_id',
																		'sexo_nombre'
                                                                        )
											);   ?>
	</div>

	<div class="row grid_2">
		<?php echo $form->label($model,'persona_tipodocumento_id'); ?>
		<?php
			echo $form->dropDownList(
                                                        $model,
                                                        'persona_tipodocumento_id',
                                                        CHtml::listData(
                                                                        TipoDocumento::model()->findAll(),
                                                                        'tipodocumento_id',
																		'tipodocumento_nombre'
                                                                        )
											); 
		?>
	</div>
	
	<div class="row grid_3">
		<?php echo $form->label($model,'persona_numerodocumento'); ?>
		<?php echo $form->textField($model,'persona_numerodocumento',array('maxlength'=>50)); ?>
	</div>
	
	<div class="row grid_4">
		<?php echo $form->label($model,'persona_cuilcuit'); ?>
		<?php echo $form->textField($model,'persona_cuilcuit',array('maxlength'=>50)); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton(Yii::t('core_labels', 'Search')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- search-form -->